package flaud

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type CaseManagementRouter struct{}

// InitCaseManagementRouter 初始化 案件管理 路由信息
func (s *CaseManagementRouter) InitCaseManagementRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	CMRouter := Router.Group("CM").Use(middleware.OperationRecord())
	CMRouterWithoutRecord := Router.Group("CM")
	CMRouterWithoutAuth := PublicRouter.Group("CM")
	{
		CMRouter.POST("createCaseManagement", CMApi.CreateCaseManagement)             // 新建案件管理
		CMRouter.DELETE("deleteCaseManagement", CMApi.DeleteCaseManagement)           // 删除案件管理
		CMRouter.DELETE("deleteCaseManagementByIds", CMApi.DeleteCaseManagementByIds) // 批量删除案件管理
		CMRouter.PUT("updateCaseManagement", CMApi.UpdateCaseManagement)              // 更新案件管理
	}
	{
		CMRouterWithoutRecord.GET("findCaseManagement", CMApi.FindCaseManagement)       // 根据ID获取案件管理
		CMRouterWithoutRecord.GET("getCaseManagementList", CMApi.GetCaseManagementList) // 获取案件管理列表
	}
	{
		CMRouterWithoutAuth.GET("getCaseManagementPublic", CMApi.GetCaseManagementPublic) // 案件管理开放接口
	}
}
